package com.cne.gmail.Gmail.dao;

import com.cne.gmail.Gmail.model.MessageModel;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.repository.MongoRepository;

import java.util.List;

public interface MessageRepository extends MongoRepository<MessageModel,String>  {
    Page<MessageModel> findByEmailAddressAndLabel(String emailAddress, String label, Pageable page);
    MessageModel findByEmailAddressAndMessageId(String emailAddress,String messageId);
    List<MessageModel> findByEmailAddressAndLabelAndFrom(String emailAddress, String label, String from);
}
